import { request } from '@/request'

export const login = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.POST<T>({ url: '/app/auth/login', params: data })
}

export const signup = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.POST<T>({ url: '/app/auth/register', params: data })
}
